Fix brain-o from last gpx change.
authorrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sun, 14 Dec 2014 01:11:37 +0000 (01:11 +0000)
committerrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sun, 14 Dec 2014 01:11:37 +0000 (01:11 +0000)
gpsbabel/gpx.cc

index 4d76be6458984f5ce5b44247b73ac547eac01fbb..52f105050b5eb1228d686c7fcc6bee86529adca0 100644 (file)
@@ -1798,10 +1798,12 @@ gpx_write(void)
    * available use it, otherwise use the default.
    */
 
-  if (gpx_version.isEmpty()) {
-    gpx_wversion = (char*)"1.0";
-  } else {
-    gpx_wversion = xstrdup(gpx_version);
+  if (!gpx_wversion) {
+    if (gpx_version.isEmpty()) {
+      gpx_wversion = (char*)"1.0";
+    } else {
+      gpx_wversion = xstrdup(gpx_version);
+    }
   }
 
   if (opt_humminbirdext || opt_garminext) {